<?php

  function shortenURL($url){
      $url = str_replace("http://", " ", $url);
      $url = str_replace("https://", " ", $url);
      if(strlen($url)<23)
	  $url = substr($url, 0, 23);
      else {
	  $url = substr($url, 0, 23);
	  $url .= "...";
      }
      return $url;
  }
?> 
